import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router, NavigationEnd } from '@angular/router';
import { menuConfig } from 'app/config/menu.config';

@Component({
  selector: 'app-work-menu',
  templateUrl: './work-menu.component.html',
  styleUrls: ['./work-menu.component.less']
})
export class WorkMenuComponent implements OnInit {

  // 通过router生成菜单数据源
  private menuList: Array<any> = menuConfig;

  constructor(
    private router: Router,
    private route: ActivatedRoute
  ) { }

  ngOnInit() {
  }

  /**
   * 页面跳转
   * @param param0
   */
  menuClick({ path }) {
    console.log(path)
    this.router.navigate([path]);
  }
}
